<template>
    <div class="floor_header floor10" v-if="show">
      <a :href="!!data.linkUrl?data.linkUrl:'javascript:;'">
      <img :src="data.picUrl | imgUrl" :alt="data.elementName">
      </a>
    </div>
</template>
<script>

export default {
  props: ['cdata'],
  data () {
    return {
      show: true,
      data: {}
    }
  },
  created() {
    if (!this.cdata[0].tag) {
      this.show = false
      return
    }
    if (this.cdata[0].tag.length == 0) {
      this.show = false
      return
    }
    this.data = this.cdata[0].tag[0]
  }
}
</script>

<style lang="scss" scoped>
  .floor_header {
      width: 100%;
      height: 1.96rem;
      margin-top: .32rem
  }

  .floor_header img {
      width: 15rem;
      height: 1.96rem
  }
</style>
